let v = new Vue({
    el:'#app',
    data:{
        user:{
            id:"",
            look:''
        }
    },
    methods:{
        findUser:function (){
            axios({
                url:`user/findUserLookById/${this.user.id}`
            }).then(response=>{
                this.user = response.data.data;
            })
        },
        updateLook:function (){
            axios({
                url:`user/updateLook/${this.user.id}/${this.user.look}`,
                method:'PUT'
            }).then(response=>{
                this.user = response.data.data;
            })
        }
    },
    created:function (){
        this.user.id = sessionStorage.getItem("userId");
        this.findUser();
        this.updateLook();
    }
});